/*******************************************************************************
 * Copyright (c) 2011 LegSem.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl-3.0.txt
 * 
 * Contributors:
 *     LegSem - initial API and implementation
 ******************************************************************************/
package com.legstar.eci.xmi.model;

import com.thoughtworks.xstream.annotations.XStreamAsAttribute;

public class ExternalDecimalTD {

    @XStreamAsAttribute
    private String addrUnit;

    @XStreamAsAttribute
    private String alignment;

    @XStreamAsAttribute
    private int base = 10;

    @XStreamAsAttribute
    private int baseInAddr;

    @XStreamAsAttribute
    private int baseUnits;

    @XStreamAsAttribute
    private int baseWidth;

    @XStreamAsAttribute
    private String signFormat;

    @XStreamAsAttribute
    private boolean signed;

    @XStreamAsAttribute
    private int width;

    @XStreamAsAttribute
    private String id;

    /** {@inheritDoc} */
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("[");
        sb.append("addrUnit" + ":'" + addrUnit + "'");
        sb.append(",");
        sb.append("alignment" + ":'" + alignment + "'");
        sb.append(",");
        sb.append("base" + ":" + base + "");
        sb.append(",");
        sb.append("baseInAddr" + ":" + baseInAddr + "");
        sb.append(",");
        sb.append("baseUnits" + ":" + baseUnits + "");
        sb.append(",");
        sb.append("baseWidth" + ":" + baseWidth + "");
        sb.append(",");
        sb.append("signFormat" + ":" + signFormat + "");
        sb.append(",");
        sb.append("signed" + ":" + signed + "");
        sb.append(",");
        sb.append("width" + ":" + width + "");
        sb.append(",");
        sb.append("id" + ":'" + id + "'");
        sb.append("]");
        return sb.toString();
    }

    /**
     * @return the ddrUnit
     */
    public String getAddrUnit() {
        return addrUnit;
    }

    /**
     * @return the alignment
     */
    public String getAlignment() {
        return alignment;
    }

    /**
     * @return the base
     */
    public int getBase() {
        return base;
    }

    /**
     * @return the baseInAddr
     */
    public int getBaseInAddr() {
        return baseInAddr;
    }

    /**
     * @return the baseUnits
     */
    public int getBaseUnits() {
        return baseUnits;
    }

    /**
     * @return the baseWidth
     */
    public int getBaseWidth() {
        return baseWidth;
    }

    /**
     * @return the signFormat
     */
    public String getSignFormat() {
        return signFormat;
    }

    /**
     * @return the signed
     */
    public boolean isSigned() {
        return signed;
    }

    /**
     * @return the width
     */
    public int getWidth() {
        return width;
    }

    /**
     * @return the id
     */
    public String getId() {
        return id;
    }

}
